package Assignment;

import java.util.Scanner;

public class Test8 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.print("输入第一个数字：");
        int x = scanner.nextInt();
        System.out.print("输入第二个数字：");
        int y = scanner.nextInt();

        int max = x > y ? x : y;
        int min = x < y ? x : y;

        int count = 0;
        for (int i = min; i <= max; i++) {
            if (i % 3 == 0 && i % 5 == 0) {
                count++;
            }
        }

        System.out.println(count);
    }
}
